#ifndef CCOMMUNICATION_H
#define CCOMMUNICATION_H

#include <QObject>
#include "caudiocontroldevice.h"
#include "cadlight.h"
#include "cadair.h"
#include "cadcurtain.h"
#include "cadmusicremote.h"
#include "cadtvremote.h"
#include "cadscene.h"
#include "caddoor.h"
#include "cadcall.h"

class CCommunication : public QObject
{
    Q_OBJECT
public:
    explicit CCommunication(QObject *parent = nullptr);

    QStringList splitShortWord(QString words);
    DEVICE_OPERATION *wordAnalyse(QString word);

    void addDevice(QString id, QString device_name, DEVICE_AUDIOCONTROL device_type, QString ops);
    void clearDevice();

protected:
    QString search_control_zone(QString word);

private:
    CADLight _light_ad;
    CADCurtain _curtain_ad;
    CADAir _air_ad;
    CADScene _scene_ad;
    CADDoor _door_ad;
    CADMusicRemote _music_ad;
    CADTvRemote _tv_ad;
    CADCall _call_ad;
};

#endif // CCOMMUNICATION_H
